import axios from "axios";
// 查询电影列表
export function listMovie(params) {
    return axios.get('http://localhost:9527/movies/selectMovieList', {
        params: params
    })
}

//jhj
// 获取烧脑悬疑电影榜单
export function getTopSuspenseMovies() {
    return axios.get('http://localhost:9527/movie/movie/top-suspense')
}

// 获取高评分电影榜单
export function getHighScoreMovies() {
    return axios.get('http://localhost:9527/movie/movie/top-high-score')
}

// 获取最新电影榜单
export function getLatestMovies() {
    return axios.get('http://localhost:9527/movie/movie/top-latest')
}

// 获取动作犯罪惊悚电影榜单
export function getActionThrillerMovies() {
    return axios.get('http://localhost:9527/movie/movie/top-action-thriller')
}

// 获取奇幻科幻电影榜单
export function getFantasySciFiMovies() {
    return axios.get('http://localhost:9527/movie/movie/top-fantasy-scifi')
}

// 获取诺兰导演电影榜单
export function getNolanMovies() {
    return axios.get('http://localhost:9527/movie/movie/top-nolan')
}

// 获取华语电影榜单
export function getChineseMovies() {
    return axios.get('http://localhost:9527/movie/movie/top-chinese')
}

// 获取某榜单的更多电影（分页）
export function getMoreMoviesByRank(name, page = 1, size = 10) {
    return axios.get(`http://localhost:9527/movie/movie/rank/${name}/more`, {
        params: {
            page,
            size
        }
    })
}

// 通过搜索框查询电影
export function searchMovie(params) {
    return axios.get('http://localhost:9527/movies/searchMovie', {
        params: params
    })
}